package com.lframework.xingyun.basedata.bo.member;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lframework.starter.common.constants.StringPool;
import com.lframework.starter.web.core.bo.BaseBo;
import java.time.LocalDateTime;

import com.lframework.xingyun.basedata.entity.Member;
import com.lframework.xingyun.basedata.entity.MemberAccount;
import io.swagger.annotations.ApiModelProperty;

import lombok.Data;

/**
 * <p>
 * 会员积分账户 QueryBo
 * </p>
 *
 * @author mos
 */
@Data
public class QueryMemberAccountBo extends BaseBo<MemberAccount> {

    /**
     * ID
     */
    @ApiModelProperty("ID")
    private String id;

    /**
     * 会员id
     */
    @ApiModelProperty("会员id")
    private String memberId;

    /**
     * 会员信息
     */
    @ApiModelProperty("会员信息")
    private QueryMemberBo member;

    /**
     * 有效积分
     */
    @ApiModelProperty("有效积分")
    private Long effectiveScore;

    /**
     * 冻结积分
     */
    @ApiModelProperty("冻结积分")
    private Long freezeScore;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN)
    private LocalDateTime updateTime;

    public QueryMemberAccountBo() {

    }

    public QueryMemberAccountBo(MemberAccount dto, Member member) {
        super(dto);
        if (member != null) {
            this.member = new QueryMemberBo(member);
        }
    }

    @Override
    public BaseBo<MemberAccount> convert(MemberAccount dto) {
        return super.convert(dto);
    }

    @Override
    protected void afterInit(MemberAccount dto) {

    }
}

